<?php
namespace app\modules\adminapi;

use app\libs\LibUser;
use app\libs\Sys;

class ForceLoginPure extends \fate\web\PureController {
    public $loginUid = '';

    public function __construct() {
        $uid = LibUser::getLoginUid();

        if(!is_numeric($uid)) {
            $this->ajaxReturn(null, 200001);
            exit;
        }

        if(!Sys::isSuperUser($uid)) {
            $this->ajaxReturn(null, 200001);
            exit;
        }

        $this->loginUid = $uid;
    }
}
